1. Field of the Invention
The present general inventive concept relates to an error diffusion processing method and apparatus. More particularly, the present general inventive concept relates to an error diffusion processing apparatus which quantizes an input grayscale value of at least one shadow area which is darker than a median grayscale value to a grayscale value which is brighter than the median grayscale value, a method thereof, and an image forming apparatus using the same.
2. Description of the Related Art
Image forming apparatuses, such as digital printers, fax machines, photocopiers and multifunction peripherals, realize an image through a plurality of pixels. In a case of printers adopting an electrophotographic developing method, the image is realized in a manner that toner particles are attracted by electric charges which are applied to an organic photoconductive (OPC) drum by pixel, and then toner images are transferred to paper as the image. An amount of the toner particles to be attracted to each pixel differs depending on a distribution or a level of the electric charges applied to the OPC by pixel, and accordingly, a gray-scale image is displayed.
In order to realize the image through the image forming apparatuses, a process is required to quantize an input grayscale value of a continuous-tone input image ranging from ‘0’ to ‘255’ to a binary grayscale value which is displayable by the image forming apparatus and thereby converts the input image to a binary-valued image. As a method for converting the input image to the binary-valued image, an error diffusion processing method has been suggested. Here, a grayscale value ‘0’ represents black and a grayscale value ‘255’ represents white.
In the error diffusion processing method, an error occurs in the process of converting the input image to the binary-valued image and is distributed to neighboring pixels, so that an average error of the binary-valued image is minimized. Therefore, the error diffusion processing method has advantages in that a reproducibility of the input image is improved and boundary artifacts are reduced.
The following equation 1 represents an algorithm for the error diffusion processing method which quantizes the input grayscale value of the input image to the binary grayscale value which is displayable by the image forming apparatus and thereby converts the input image into the binary-valued image.
                                          e            ⁡                          (                              m                ,                n                            )                                =                                    u              ⁡                              (                                  m                  ,                  n                                )                                      -                          b              ⁡                              (                                  m                  ,                  n                                )                                                    ⁢                                  ⁢                              u            ⁡                          (                              m                ,                n                            )                                =                                    x              ⁡                              (                                  m                  ,                  n                                )                                      +                                          ∑                                                      (                                          k                      ,                      l                                        )                                    ∈                  R                                            ⁢                                                e                  ⁡                                      (                                                                  m                        -                        k                                            ,                                              n                        -                        1                                                              )                                                  ×                                  w                  ⁡                                      (                                          k                      ,                      l                                        )                                                                                      ⁢                                  ⁢                                            if              ⁢                                                          ⁢                              b                1                                      <                                                  ⁢                          u              ⁡                              (                                  m                  ,                  n                                )                                      ≤                          b              0                                ,                                    b              ⁡                              (                                  m                  ,                  n                                )                                      =                          {                                                                                                                                                                        b                            0                                                                                                                                                              if                              ⁢                                                                                                                          ⁢                                                              u                                ⁡                                                                  (                                                                      m                                    ,                                    n                                                                    )                                                                                                                      ≥                                                          T                              1                                                                                                                                                                                                        b                            1                                                                                                    else                                                                                      ⁢                                                                                  ⁢                    if                    ⁢                                                                                  ⁢                                          b                      2                                                        <                                                                          ⁢                                      u                    ⁡                                          (                                              m                        ,                        n                                            )                                                        ≤                                      b                    1                                                  ,                                                      b                    ⁡                                          (                                              m                        ,                        n                                            )                                                        =                                      {                                                                                                                                                                                                                        b                                  1                                                                                                                                                                                                  if                                    ⁢                                                                                                                                                  ⁢                                                                          u                                      ⁡                                                                              (                                                                                  m                                          ,                                          n                                                                                )                                                                                                                                              ≥                                                                      T                                    2                                                                                                                                                                                                                                                        b                                  2                                                                                                                            else                                                                                                              ⁢                                                                                                          ⁢                          if                          ⁢                                                                                                          ⁢                                                      b                                                          j                              -                              1                                                                                                      <                                                                                                  ⁢                                                  u                          ⁡                                                      (                                                          m                              ,                              n                                                        )                                                                          ≤                                                  b                                                      j                            -                            2                                                                                              ,                                                                        b                          ⁡                                                      (                                                          m                              ,                              n                                                        )                                                                          =                                                  {                                                                                                                                                      b                                                                      j                                    -                                    2                                                                                                                                                                                                                                    if                                    ⁢                                                                                                                                                  ⁢                                                                          u                                      ⁡                                                                              (                                                                                  m                                          ,                                          n                                                                                )                                                                                                                                              ≥                                                                      T                                                                          j                                      -                                      1                                                                                                                                                                                                                                                                                            b                                                                      j                                    -                                    1                                                                                                                                                              else                                                                                                                                                                                                                                                                [                  Equation          ⁢                                          ⁢          1                ]            
where ‘x(m, n)’ denotes an input grayscale value of a pixel (m, n) of an input image, and ‘b(m, n)’ denotes a binary grayscale value which is obtained by quantizing the input grayscale value of the pixel (m, n). ‘e(m, n)’ denotes an error between the input grayscale value and the binary grayscale value of the pixel (m, n). ‘u(m, n)’ denotes a modified input grayscale value of the pixel (m, n).
The error is propagated to the neighboring pixels according to an error diffusion coefficient ‘w(k, l)’, and the modified input grayscale value ‘u(m, n)’ is quantized based on a range divided by thresholds T1˜Tj-1 and converted to the binary grayscale value ‘b(m, n)’. For example, a binary-level halftoning is performed in a manner that if the modified input grayscale value is greater than a threshold 128, the binary grayscale value ‘b(m, n)’ is set to 255, and if the modified input gray value is not greater than the threshold 128, the binary grayscale value ‘b(m, n)’ is set to 0. If two thresholds are used to divide a quantization range into 3 or more, a multi-level halftoning can be used.
FIGS. 1A to 1G are views illustrating binary-valued images which are processed according to a conventional error diffusion processing method using the equation 1 and produced by a laser printer.
FIGS. 1A to 1C illustrate images which are realized under an ideal condition, whereas FIGS. 1D to 1F show images which are realized under a real condition.
FIG. 1A illustrates data about a binary-valued image which is scanned onto an organic photoconductive (OPC) drum of the laser printer, FIG. 1B illustrates an electric charge formed on the OPC drum, corresponding to the binary-valued image of FIG. 1A, and FIG. 1C illustrates an image which is printed on paper.
FIG. 1D shows data about a binary-valued image which is scanned onto the OPC drum of the laser printer, FIG. 1E illustrates an electric charge which is actually formed on the OPC drum, corresponding to the binary-valued image of FIG. 1D, and FIG. 1F illustrates an image which is actually printed on paper. As shown in FIG. 1E, when a laser beam is scanned onto a pixel of an image to express the pixel with a black dot corresponding to a grayscale value ‘0’, neighboring pixels are unintentionally subjected to the energy of the laser beam. As shown in FIG. 1F, one of the neighboring pixels which intends to be expressed with a white dot corresponding to a grayscale value ‘255’ is modified or changed to be expressed in a median grayscale level because excessive toner particles are attracted to the pixel due to the energy applied to the neighboring pixels.
FIG. 1G shows one example of an image which is actually realized through the laser beam described in FIGS. 1D to 1F.
Referring to FIG. 1G, two black dots are shown on paper, and undesirable toner particles are attracted to neighboring pixels around the black dots due to the energy of the laser beam applied to the pixels of the black dots. For example, the toner particles are attracted to a pixel A due to the overlapping of the energies of the laser beams applied the two black dots, and thus, the pixel A is expressed in an undesirable grayscale level.
FIGS. 2A to 2C are view illustrating a 3-level binary-valued image which is processed according to a conventional error diffusion processing method using the above-described equation 1.
FIG. 2A illustrates data about a 3-level binary-valued image which is scanned onto an OPC drum of the laser printer, and FIG. 2B illustrates an electric charge which is actually formed on the OPC corresponding to the 3-level binary-valued image of FIG. 2A.
FIG. 2C illustrates an example of an image which is actually realized on paper through laser beams of FIGS. 2A to 2B. Referring to FIG. 2C, a pixel B, which is to be expressed in a median grayscale value ‘128’, appears nearly black because toner particles of the pixel B are overlapped with toner particles of neighboring pixels due the energy of the laser beams.
FIGS. 3A to 3D are views illustrating continuous-tone images having grayscale value from ‘255’ to ‘0’ and binary-valued images which are processed according to a conventional error diffusion processing method using the equation 1.
FIG. 3A illustrates a continuous-tone image which has grayscale values from ‘255’ to ‘128’. FIG. 3B illustrates a continuous-tone image which has grayscale values from ‘128’ to ‘0’. FIGS. 3C and 3D illustrate images which are obtained by processing the input image of FIGS. 3A and 3B to 3-level images of grayscale values ‘0’, ‘128’, and ‘255’ according to the error diffusion method using the above-described equation 1.
Referring to FIGS. 3A to 3D, if an area is brighter than a median grayscale value ‘128’, the area is expressed by a combination of a white dot corresponding to the grayscale value ‘255’ and a half dot corresponding to the grayscale value ‘128’ as shown in FIG. 3C. If an area is darker than the median grayscale value ‘128’, the area is expressed by a combination of a black dot corresponding to the grayscale value ‘0’ and the half dot corresponding to the grayscale value ‘128’ as shown in FIG. 3D.
However, a shadow area of FIG. 3D, which is expressed by the combination of grayscale values ‘0’ and ‘128’ and is darker than the median grayscale value, is not expressed using a median level of grayscale but only a black level of grayscale due to the overlapping of laser beam energies of the neighboring pixels.